﻿using CMWVS.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace bleissem.CMWVS.Commands
{
    public class CommandCreator
    {
        public CommandCreator(MainViewModel mvm, Resolver resolver)
        {
            m_MainViewModel = mvm;
            m_Resolver = resolver;
        }

        private MainViewModel m_MainViewModel;
        private Resolver m_Resolver;

        public TBaseCommand Create<TBaseCommand>() where TBaseCommand : BaseCommand, new()
        {
            TBaseCommand cmd = new TBaseCommand();
            cmd.Initialize(m_MainViewModel, m_Resolver);
            return cmd;
        }
    }
}